<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML>
<html>
<head>
  <title>后台管理系统</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link href="/resources/css/dpl-min.css" rel="stylesheet" type="text/css" />
  <link href="/resources/css/bui-min.css" rel="stylesheet" type="text/css" />
  <link href="/resources/css/page-min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="container">

   <form id="searchForm" class="form-horizontal">
           <input type="hidden" class="control-text" name="id" value="${id}">
            <input type="hidden" class="control-text" name="index" value="${index}">
            <a href="javascript:void(0);" onclick="back()">返回</a>
    </form>

    <div class="search-grid-container">
        <div id="grid"></div>
    </div>
</div>
<script type="text/javascript" src="/resources/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="/resources/js/bui-min.js"></script>
<script type="text/javascript" src="/resources/js/config-min.js"></script>
<script type="text/javascript">
    var store,gridCfg;
  BUI.use(['common/search','common/page','bui/grid','bui/overlay','bui/form'],function (Search,Page,Grid,Overlay,Form) {
    var  columns = [
              {title:'名称',dataIndex:'cardName',width:320},
              {title:'账号',dataIndex:'account',width:120},
              {title:'用户类型',dataIndex:'type',width:100,renderer:function(value,obj){
                    if(obj.type=='Gold'){
                        return "金牌代理商";
                    }else if(obj.type=='General'&&obj.userLevel!='1'){
                        return "全国总代";
                    }else if(obj.type=='General'&&obj.userLevel=='1'){
                        if(obj.userLevel=='0'){
                            return "省级合伙人";
                        }else if(obj.userLevel=='1'){
                            return "副省级合伙人";
                        }else if(obj.userLevel=='2'){
                            return "地市合伙人";
                        }else if(obj.userLevel=='3'){
                            return "区县合伙人";
                        }
                        return "区域合伙人";
                    }else if(obj.type=="Partner"){
                        return "区域合伙人";
                    }else if(obj.type=='Customer'){
                        return "普通用户";
                    }
                }},
                {title:'联系电话',dataIndex:'mobile',width:120},
                {title:'加入时间',dataIndex:'dateStr',width:150}
            ];
            store = Search.createStore('/member/teamMemberData');
            gridCfg = Search.createGridCfg(columns,{

              plugins : [BUI.Grid.Plugins.CheckSelection] // 插件形式引入多选表格
            });

  });


    function back(){
        top.topManager.openPage({
            id : 'user_list',
            isClose : true
        });
    }

</script>
<script type="text/javascript" src="/views/js/list.js"></script>

</body>
</html>  
